package com.stephenone.zhdaily.data.api;


import com.stephenone.zhdaily.data.bean.Comments;
import com.stephenone.zhdaily.data.bean.News;
import com.stephenone.zhdaily.data.bean.NewsDetail;

import io.reactivex.Flowable;
import retrofit2.http.GET;
import retrofit2.http.Path;

/**
 * Created by StephenOne on 2017/11/3.
 * Charles Android手机 https 抓包      https://www.jianshu.com/p/3bbf596c9ca6
 * 小米手机上安装crt证书                http://bbs.xiaomi.cn/t-13605474-1-o1
 *
 */



public interface ZhihuNewsService {
    @GET("news/latest")
    Flowable<News> getLatestNews();

    @GET("news/before/{currentDate}")
    Flowable<News> getBeforeNews(@Path("currentDate") String currentDate);

    @GET("news/{id}")
    Flowable<NewsDetail> getNewsDetail(@Path("id") long id);

    @GET("story/{id}/long-comments")
    Flowable<Comments> getLongComments(@Path("id") long id);

    @GET("story/{id}/short-comments")
    Flowable<Comments> getShortComments(@Path("id") long id);

    //https://news-at.zhihu.com/api/4/story/9673638/short-comments/before/31325817
    @GET("story/{story_id}/short-comments/before/{comment_id}")
    Flowable<Comments> getShortCommentsBefore(@Path("story_id") long storyId,@Path("comment_id") long commentId);
}
